package com.storm.lib.template;

import java.util.List;
import java.util.concurrent.ConcurrentHashMap;

import org.apache.mina.core.session.IoSession;
import org.springframework.stereotype.Controller;
@Controller
public class ChatTempate {
	/**
	 * 用户的聊天Cache,key=IoSession,value=聊天语句;
	 */
	public static ConcurrentHashMap<IoSession, List<String>> chatCache = new ConcurrentHashMap<IoSession, List<String>>();
	
	/**
	 * key=iuid value=iosession
	 */
	public static ConcurrentHashMap<String,IoSession> chatWorldRoom = new ConcurrentHashMap<String, IoSession>();
	
	/**
	 * key1=areaId value=一个当前场景聊天的房间 key2=iuid value2 = iosession
	 */
	public static ConcurrentHashMap<Integer,ConcurrentHashMap<String,IoSession>> chatAreaRooms = new ConcurrentHashMap<Integer, ConcurrentHashMap<String,IoSession>>();
	
	/**
	 * key1=guildId value=一个帮会聊天的房间 key2=iuid value2 = iosession
	 */
	public static ConcurrentHashMap<Integer,ConcurrentHashMap<String,IoSession>> chatGuildRooms = new ConcurrentHashMap<Integer, ConcurrentHashMap<String,IoSession>>();
	
	/**
	 * key1=teamId value=一个组队聊天的房间 key2=iuid value2 = iosession
	 */
	public static ConcurrentHashMap<Integer,ConcurrentHashMap<String,IoSession>> chatTeamRooms = new ConcurrentHashMap<Integer, ConcurrentHashMap<String,IoSession>>();

	public ConcurrentHashMap<IoSession, List<String>> getChatCache() {
		return chatCache;
	}

	public ConcurrentHashMap<String,IoSession> getChatWorldRoom() {
		return chatWorldRoom;
	}

	public ConcurrentHashMap<Integer, ConcurrentHashMap<String, IoSession>> getChatAreaRooms() {
		return chatAreaRooms;
	}



}
